package com.wyw.design.model.learning.structure.flyweight;

/**
 * @Title       抽象享元角色
 * @Description
 * @Author Mr Wu yewen.wu.china@gmail.com
 * @Date 2023/3/30 18:17
 * Update History:
 * Author        Time            Content
 */
public abstract class Flyweight {

    // 内部状态
    private String intrinsic;

    // 外部状态
    protected final String extrinsic;

    public Flyweight(String extrinsic) {
        this.extrinsic = extrinsic;
    }

    // 定义的业务操作
    public abstract void operate();

    // 内部状态的getter、setter
    public String getIntrinsic() {
        return intrinsic;
    }

    public void setIntrinsic(String intrinsic) {
        this.intrinsic = intrinsic;
    }
}
